#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtCore/qhash.h>
#include <QtGui/qmainwindow.h>

QT_FORWARD_DECLARE_CLASS(QMdiArea)
QT_FORWARD_DECLARE_CLASS(QMdiSubWindow)
QT_FORWARD_DECLARE_CLASS(QTabBar)

class DokerModel;
class DokerProcessor;
class DokerWindow;
class LogDock;
class SourceDock;

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

public slots:

protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void fileOpen();
    bool fileSave();
    void fileRun();
    void fileExport();
    void viewLanguage();
    void helpAbout();
    void setModelControlsEnabled(bool enabled = true);


private:
    void createActions();
    void createDocks();
    void createMenus();
    void createToolBars();

private:
    const static char               *m_languages[];
    QHash<const QString, QAction *>  m_actions;

    DokerModel                      *m_model;
    SourceDock                      *m_sourceDock;
    DokerWindow                     *m_win;
    LogDock                         *m_logDock;
    DokerProcessor                  *m_processor;

};

#endif // MAINWINDOW_H
